package com.kaigejava.singleton;

/**
 * Created by kaigejava on 2019/8/21.
 * 饿汉式单例模式
 */
public class HungrySingleton {
    private static  HungrySingleton hungrySingleton = null;

    private HungrySingleton(){}

    public static  HungrySingleton getInstance(){
        hungrySingleton = new HungrySingleton();
        return hungrySingleton;
    }
}
